Learn R Programming

Dasst (version 0.3.4)

[: "[" method for class Dasst

Description

"[" gets a subset of an object of class '>Dasst.

Arguments

x

An object of class '>Dasst.

i

An integer or logical vector. This is the subset that will be retrieved from the whole object.

Value

A new object of class '>Dasst that comprises the elements from the selected subset.

Details

This method gets a subset of an object of class '>Dasst. Shorter objects in the expression are recycled as often as need be until they match the length of the longest object.

See Also

[<-

Examples

Run this code
# NOT RUN {
data(plantGrowth)
length(plantGrowth)
plantgro1 <- plantGrowth[1:10]
length(plantgro1)
class(plantgro1)

# Drop contents corresponding to selected orders
summary(plantGrowth)
plantgro2 <- plantGrowth[-1]
summary(plantgro2)
# }

Run the code above in your browser using DataLab